{include file=member.header.html}
<script>
//字数过滤
function focusText(obj) {
	$(obj).unbind('input propertychange');
	var temp = '';
	$(obj).bind('input propertychange', function() {
		var val = $(obj).val();
		if (val.length == 500) {
			temp = val;
		}
		if (val.length > 500) {
			$(obj).val(temp);
			window.alert('拒绝原因字数超限');
		}
	});
}
//显示提示语
function showTipsPop(o){
	var obj=$(o);
	$('#tips_pop').show();
}
//隐藏提示语
function hideTipsPop(o){
	var obj=$(o);
	$('#tips_pop').hide();
}
$(function() {
	var add_file=$('#add_file');
	add_file.bind('click',function(){
		var lastLi=$('#morefile').children('li[enctype="file"]:last');
		var len=$('#morefile').children('li[enctype="file"]').length;
		if(len>4){
			add_file.hide();
		}else{
			lastLi.after('<li enctype="file"><input type="file" name="file_'+(len+1)+'" class="file"></li>');
		}
	});
	$('#wlform').validate({
        errorPlacement: function(error, element) {
            element.parent().append(error);
        },
        rules: {
        	refuse:{
        		required: true
        	},
            message:{
            	required: true
            }  
        },
        messages: {
            message:{
        		required:'拒绝原因不能为空'
        	}  
        }
    });
});
</script>
<div class="content f-cb"> {include file=path.html}
  {include file=member.menu.html}
  <!-- 内容右边栏 -->
  <div class="con-r-global">
   <!--退款-->
    <!--{if $returns.type eq 1}-->
    <div class="sales-return-progress05"></div>
    <table width="100%" class="return-table-success">
      <tr>
        <td width="290">{$returns.add_time|date:Y-m-d H:i:s}</td>
        <td width="300">&nbsp;</td>
        <td width="300">&nbsp;</td>
        <td width="146">&nbsp;</td>
      </tr>
    </table>
    <!--{/if}-->
    <!--退货退款-->
    <!--{if $returns.type eq 2}-->
    <div class="return-progress-success"></div>
    <table width="100%" class="return-table-success">
      <tr>
        <td width="290">{$returns.add_time|date:Y-m-d H:i:s}</td>
        <td width="300">&nbsp;</td>
        <td width="300">&nbsp;</td>
        <td width="146">&nbsp;</td>
      </tr>
    </table>
    <!--{/if}-->
    <dl class="status">
      <dt>
        <h4>拒绝{$returns_type_arr.$returns.type}</h4>
      </dt>
      <dd>
        <form action="" method="post" id="wlform" enctype="multipart/form-data">
          <table class="return-table-content" width="100%">
            <tr>
              <td width="80" valign="top"><i>*</i> 拒绝原因：</td>
              <td><textarea name="message" placeholder="输入文本，500字以内" onfocus="focusText(this)"></textarea></td>
            </tr>
            <tr>
              <td valign="top">上传凭证：</td>
              <td><ol class="valid-d" id="morefile">
                  <li enctype="file">
                    <input type="file" name="file_1" class="file" />
                    <span class="help" onmouseenter="showTipsPop(this)" onmouseleave="hideTipsPop(this)">上传帮助</span> </li>
                  <li> <a href="javascript:void(0)" id="add_file" class="addfile">增加图片</a> <a href="javascript:void(0)" id="close_file" class="closefile"></a> </li>
                  <li id="tips_pop" class="tips_pop">最多可上传5张图片，每张图片大小不超过500KB，支持jpg，jpeg，png，gif格式文件。</li>
                </ol></td>
            </tr>
            <tr>
              <td align="center">&nbsp;</td>
              <td><input type="submit" value="确认拒绝" class="subbtnhs" />
                <input  type="button" onclick="javascript:history.go(-1);" value="取消并返回" class="btngray ml10" /></td>
            </tr>
          </table>
        </form>
      </dd>
    </dl>
    <div class="return-div-success">
      <!--退货退款日志-->
      <!--{if $returns_log}-->
      <dl class="info">
        <dt>
          <h4>跟踪信息</h4>
        </dt>
        <dd>
          <table width="100%">
            <tr>
              <td width="200" class="gray">处理时间</td>
              <td width="580" class="gray">处理信息</td>
              <td width="94" class="gray">操作人</td>
            </tr>
            <!--{foreach from=$returns_log item=log}-->
            <tr>
              <td>{$log.log_time|date:Y-m-d H:i:s}</td>
              <td><p>{$log.remark|escape}</p></td>
              <td>{$log.operator|escape}</td>
            </tr>
            <!--{/foreach}-->
          </table>
        </dd>
      </dl>
      <!--{/if}-->
      <!--退货退款申请信息-->
      <dl class="info">
        <dt>
          <h4>
            <!--{if $returns.type eq 1}-->
            退款详情
            <!--{/if}-->
            <!--{if $returns.type eq 2}-->
            退货详情
            <!--{/if}-->
          </h4>
        </dt>
        <dd>
          <table class="mb25" width="100%">
            <tr>
              <td width="105" class="pdl50"><a href="{jsurl app=goods&id=$returns.goods_id}" title="{$returns.goods_name|escape}" target="_blank"><img src="{$returns.goods_image}" alt="{$returns.goods_name|escape}" width="100" height="100" /></a></td>
              <td><p class="title"><a href="{jsurl app=goods&id=$returns.goods_id}" title="{$returns.goods_name|escape}" target="_blank" class="linkbtn">{$returns.goods_name|escape}</a></p>
                <p>购物数量：<i id="quantity">{$returns.goods_quantity}</i></p>
                <!--{if $returns.specification}-->
                <p>{$returns.specification|escape}</p>
                <!--{/if}--></td>
            </tr>
          </table>
          <table class="return-table-content mb30" width="100%">
            <tr>
              <td width="100" class="pdl50"><!--{if $returns.type eq 1}-->
                退款商品数：
                <!--{/if}-->
                <!--{if $returns.type eq 2}-->
                退货商品数：
                <!--{/if}--></td>
              <td>{$returns.quantity}件</td>
            </tr>
            <tr>
              <td class="pdl50"><!--{if $returns.type eq 1}-->
                退款原因：
                <!--{/if}-->
                <!--{if $returns.type eq 2}-->
                退货原因：
                <!--{/if}--></td>
              <td> {$returns.returns_reason|escape} </td>
            </tr>
            <!--{if $returns.returns_explain}-->
            <tr>
              <td class="pdl50">补充说明：</td>
              <td><p style="width:600px;">{$returns.returns_explain|escape}</p></td>
            </tr>
            <!--{/if}-->
            <!--{if $returns.returns_img}-->
            <tr>
              <td class="pdl50">相关图片：</td>
              <td><ul class="imgs f-cb" >
                  <!--{foreach from=$returns.returns_img item=img}-->
                  <li><img src="{$img}" alt="" width="60" height="60" /></li>
                  <!--{/foreach}-->
                </ul></td>
            </tr>
            <!--{/if}-->
            <tr>
              <td class="pdl50">需退商品金额：</td>
              <td><span class="coe6">{$returns.goods_amount}</span> 元 </td>
            </tr>
            <!--{if $returns.shipping_fee}-->
            <tr>
              <td class="pdl50">需退运费：</td>
              <td><span class="coe6">{$returns.shipping_fee}</span> 元 </td>
            </tr>
            <!--{/if}-->
          </table>
        </dd>
      </dl>
    </div>
  </div>
</div>
{include file=footer.html} 